package com.codecrane.core.util;

/**
 * 物流状态
 */
public enum PhysicalStockStatusEnum {
    待发运(1, "待发运"),
    已发运(2,"已发运"),
    已送货(3,"已送货"),
    已入库(4,"已入库");

    private int code;
    private String msg;

    PhysicalStockStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }



    public static String getStatusName(int code) {
        for (PhysicalStockStatusEnum statusEnum : PhysicalStockStatusEnum.values()) {
            if (code == statusEnum.getCode()) {
                return statusEnum.getMsg();
            }
        }
        return "";
    }
}
